Ext.define('DutyList.calendar.dd.DropZonUserToCalendarPanel',{
    extend: 'Ext.dd.DropZone',
    require:[
        'Ext.Layer',
        'DutyList.calendar.util.Date',
        'DutyList.calendar.data.SheduleMappings'
    ],
    eventSelector: '.ext-cal-evt',
    getTargetFromEvent: function(e) {
        var el = Ext.get(e.getTarget(this.view.eventSelector,1)).findParent('.ext-cal-day-nighttime',3,true) || Ext.get(e.getTarget(this.view.eventSelector,1)).findParent('.ext-cal-day-daytime',3,true);
        return el ? this.view.getDateFromId(el.id) : null;
    },
    onNodeOver: function(n, dd, e, data) {
        console.log('sdfgsdf');
        var range = Ext.Date.format( Ext.Date.parse(n.startDate,'Ymd'), 'n/j'),
            msg = Ext.util.Format.format('move  {0} to  {1} {2}',data.rec.data.name, range,(n.night ? 'night' : 'day'));
        data.proxy.updateMsg(msg);
        return this.dropAllowed;
    }
});
